<template>
  <div>
      <h2>嵌套路由↓</h2>
    <div>
      <a @click="skip('/index','Index')">主页</a> |
      <a @click="skip('/news','News')">新闻</a> |
      <a @click="skip('/sports','Sports')">体育</a> |
    </div>
    <div>
      <router-view></router-view>
    </div>
  </div>
</template>


<script>
export default {
  data () {
    return {
      msg: ''
    }
  },
  methods: {
    skip(targetPath, targetName) {
      this.$router.push({
        // path: targetPath
        name: targetName
      }) 
    },
  }
}
</script>

<style>

</style>